package com.example.wlzz.repository.mapper;

import com.example.wlzz.dto.ExcelMajorDTO;
import com.example.wlzz.entity.ExcelMajor;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface ExcelMajorMapper{
    @Select("select main_cateory from excel_major group by main_cateory")
    List<String>  getMainCateory();
    @Select("select sub_cateory from excel_major where main_cateory = #{main_cateory} group by sub_cateory")
    List<String>  getSubCateory(@Param("main_cateory") String main_cateory);
    @Select("select major_name,major_url,sub_cateory from excel_major where sub_cateory = #{sub_cateory}")
    List<ExcelMajorDTO> getMajor(@Param("sub_cateory") String sub_cateory);
}
